Skip to content

popup menu for multi-reference bookmark navigation (#crossref)#1335

Merged
karlkleinpaste merged 1 commit into
crosswire:masterfrom
LAfricain:crossref-popup
Jul 4, 2026
Merged

popup menu for multi-reference bookmark navigation (#crossref)#1335
karlkleinpaste merged 1 commit into
crosswire:masterfrom
LAfricain:crossref-popup

Conversation

@LAfricain

Copy link
Copy Markdown
Contributor

Add a user-controlled option for navigating multi-reference bookmarks:

  • When a bookmark key contains multiple references (semicolons, commas, or verse ranges), the user can choose between two behaviours via a new 'Open cross-references in a popup menu' toggle in the bookmark context menu.

  • When enabled (checked): a popup menu lists each reference individually; clicking one navigates directly to that verse. Verse ranges (e.g. Mt 15:1-9) are displayed with their full label but navigate to the first verse of the range.

  • When disabled (unchecked): the full key is passed to main_url_handler which displays all references in the Verse List as before.

  • Single references and studypad bookmarks are unaffected.

  • The preference is saved to and restored from the Xiphos config file under misc/crossref_popup (default: 0 = verse list behaviour).

Add a user-controlled option for navigating multi-reference bookmarks:

- When a bookmark key contains multiple references (semicolons, commas,
  or verse ranges), the user can choose between two behaviours via a new
  'Open cross-references in a popup menu' toggle in the bookmark context
  menu.

- When enabled (checked): a popup menu lists each reference individually;
  clicking one navigates directly to that verse. Verse ranges (e.g.
  Mt 15:1-9) are displayed with their full label but navigate to the
  first verse of the range.

- When disabled (unchecked): the full key is passed to main_url_handler
  which displays all references in the Verse List as before.

- Single references and studypad bookmarks are unaffected.
- The preference is saved to and restored from the Xiphos config file
  under misc/crossref_popup (default: 0 = verse list behaviour).
@karlkleinpaste karlkleinpaste merged commit 8ba746a into crosswire:master Jul 4, 2026
7 checks passed
@karlkleinpaste

Copy link
Copy Markdown
Contributor

This seemed good. I will make one adjustment to provide for initialization in xml.c.

@karlkleinpaste

Copy link
Copy Markdown
Contributor

Oh no. I did this too soon.

Glitch. Big glitch.
This is what a verse dump of mine looks like in the old way, without popup.
Screenshot at 2026-07-04 11-01-51

This is what the same verse dump looks like in the popup.
Screenshot at 2026-07-04 11-03-21

If I click the entry for Acts 8:36, being fully specified, it goes there correctly.
But when I now click the entry for any other partially specified item, it goes ... somewhere utterly random.

The problem is that incomplete specification is handled properly when the verse list is processed by Sword.
That is, this bookmark entry that I handcrafted...

<Bookmark modulename="" key="Matt.17.20; 18.10; 23.13; Mark.7.15; 9.43,45; 11.25; 15.27; Luke.17.35; 23.16; John.5.3; Acts.8.36; 15.33; 24.6; 28.28; Romans.16.23" moduledescription=" " description="Verses should not exist"/>

...works fine when processed by Sword because it contextually fills in the fact that e.g. "18:10" is part of a Matthew citation. So it fills that in when returning the list of individual verses.

The popup handling does not provide for this. It leaves the partial (but proper and normal) specification as partial, leaving it contextually unanchored when referenced alone.

I don't want to revert this because the concept is fine, especially being user-selectable so the old behavior is default. But it very badly needs a fix to pass the verse list through Sword for contextual resolution.

@LAfricain

Copy link
Copy Markdown
Contributor Author

Ok this week I'm busy busy!! Next week I will look at this.

@karlkleinpaste

Copy link
Copy Markdown
Contributor

No sweat. The sole problem is that you still need to pass the bookmark's verse list through Sword just as is done when preparing the verse list dump in the default no-popup case.

@LAfricain

Copy link
Copy Markdown
Contributor Author

In the end, Claude solved it for me in 15 minutes! I hope that's okay, but take a look at the screenshot—it seems to match the bookmarks you gave me.
crossref

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants